package com.sjp.blog.common.vo;

import java.io.Serializable;

/**
 * 返回参数
 * <p>
 * Created by zyhuang on 2017/6/16.
 */
//@JsonInclude(JsonInclude.Include.NON_NULL)
public class Response<T> implements Serializable {
    private static final long serialVersionUID = 3007453033348510950L;

    private Boolean success;
    private int code = 0;
    private String message;
    private T data;

    public static <T> Response<T> newInstance() {
        return new Response<>();
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }


    public void setCode(int code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
